import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login'),
  },
  {
    path: '/',
    component: () => import('@/Layout'),
    children: [
      {
        path: '/',
        name: 'home',
        component: () => import('@/views/home'),
      },
      {
        path: '/company',
        name: 'company',
        component: () => import('@/views/company'),
      },
      {
        path: '/people',
        name: 'people',
        component: () => import('@/views/people'),
      },
      {
        path: '/my',
        name: 'my',
        component: () => import('@/views/my'),
      },
    ],
  },
]

const router = new VueRouter({
  routes,
})

export default router
